Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Implemented the context manager protocol #721

Closed
wants to merge 1 commit into from

Conversation

JustusAdam
Copy link

Python supports so called context managers. These can be used to automatically cleanup resources, even in the case of exceptions.

This PR implements the methods necessary for the context manager protocol (__enter__ and __exit__).

@aviau
Copy link
Collaborator

aviau commented Jun 5, 2019

Okay, this is fine.

Can you write a test please?

@JustusAdam
Copy link
Author

Ah, whoops, I somehow didn't see you commented on this... Sorry for not responding, and thanks for implementing this 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants